<script>
import { mapMutations, mapState } from 'vuex'

export default {
    methods:mapMutations([
        "incrementCount",
        "incrementIndex"
    ]),
    computed:{
        ...mapState(["count","index"]),
    }
}
</script>

<template>
    <p>count:{{count}}</p>
    <p>index:{{index}}</p>
    <button @click="incrementCount(2)">changeCount</button>
    <button @click="incrementIndex({num:3})">changeIndex</button>
</template>

